/*
 * @Author: wangc
 * @Date: 2021-03-15 12:54:06
 * @Description: 坯布
 */
import { request } from '@/utils/request'

// 坯布仓库出库列表
export function loadClothStoreOutData(data, callBack) {
    return request({
        url: '/grey_cloth_store/out_list',
        method: 'get',
        data,
        isYarn: true,
        isEmpty: true,
    }, callBack)
}

// 库存 出库
export function greyClothStoreOutConfirm(data, callBack) {
    return request({
        url: '/grey_cloth_store/out',
        method: 'post',
        data,
        isYarn: true,
        type: 'json'
    }, callBack)
}

// 坯布库存详情 id查询
export function greyClothStoreCheckDetail(data, callBack) {
    return request({
        url: '/grey_cloth_store_check/detail',
        method: 'get',
        data,
        isYarn: true,
        isId: true
    }, callBack)
}

// 坯布盘库id 查询
export function getClothStoreIdCheck(data, callBack) {
    return request({
        url: '/grey_cloth_store_check/list',
        method: 'get',
        data,
        isYarn: true,
    }, callBack)
}

// 查询品名
export function getDesignNoByName(data, callBack) {
    return request({
        url: '/grey_cloth/design_no_filter',
        method: 'get',
        data,
        isYarn: true,
    }, callBack)
}

// 坯布入库
export function getClothStoreInList(data, callBack) {
    return request({
        url: '/grey_cloth_store/in_list',
        method: 'get',
        data,
        isYarn: true,
    }, callBack)
}

// 坯布入库新增
export function getClothStoreInAdd(data, callBack) {
    return request({
        url: '/grey_cloth_store/in',
        method: 'post',
        data,
        isYarn: true,
        type: 'json'
    }, callBack)
}

// 根据坯布id 获取坯布信息
export function getGreyClothPub(data, callBack) {
    return request({
        url: '/produce_chain/cloth_pub',
        method: 'get',
        data,
        isYarn: true
    }, callBack)
}

// 根据出库单id 获取坯布信息
export function getGreyClothGet(data, callBack) {
    return request({
        url: '/grey_cloth/get',
        method: 'get',
        data,
        isYarn: true,
        isId: true
    }, callBack)
}

// 确认解锁
export function getGreyClothUnlock(data, callBack) {
    return request({
        url: '/grey_cloth_store/out_unlock',
        method: 'post',
        data,
        isYarn: true,
        isFile: true
    }, callBack)
}

// 确认移区
export function getGreyClothChangeArea(data, callBack) {
    return request({
        url: '/grey_cloth_store/change_area',
        method: 'post',
        data,
        isYarn: true,
        type: 'json'
    }, callBack)
}

// 坯布区域详情
export function greyClothAreaNums(data, callBack) {
    return request({
        url: '/grey_cloth_store/area_nums',
        method: 'get',
        data,
        isYarn: true,
    }, callBack)
}

// 坯布汇总
export function getGreyClothViewList(data, callBack) {
    return request({
        url: '/grey_cloth_store/list_4_view',
        method: 'get',
        data,
        isYarn: true
    }, callBack)
}

// 坯布仓库 storeIds
export function loadGreyClothStoreData(data, callBack) {
    return request({
        url: '/grey_cloth_store/list',
        method: 'get',
        data,
        isYarn: true
    }, callBack)
}
// 库存总数
export function sumGreyClothStore(data, callBack) {
    return request({
        url: '/grey_cloth_store/total_stock',
        method: 'get',
        data,
        isYarn: true
    }, callBack)
}

// 流程明细
export function getCurStepSummaryByStroe(data, callBack) {
    return request({
        url: '/cloth_arrange/cur_step_summary_by_store',
        method: 'get',
        data,
        isYarn: true,
    }, callBack)
}

// 坯布入库新增
export function productStoreChangeArea(data, callBack) {
    return request({
        url: '/product_cloth_store/change_area',
        method: 'post',
        data,
        isYarn: true,
        type: 'json'
    }, callBack)
}

// 预出库确认
export function greyClothPreOutConfirm(data, callBack) {
    return request({
        url: '/grey_cloth_store/pre_out_check',
        method: 'post',
        data,
        isYarn: true,
        isFile: true
    }, callBack)
}

// 坯布出库单详情
export function greyClothOutDetail(data, callBack) {
    return request({
        url: '/grey_cloth_store/out_detail',
        method: 'get',
        data,
        isYarn: true,
        isId: true
    }, callBack)
}